#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：12.在班级类中保存多个学生对象.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-10-22 14:40
'''
class ClassRoom:
    def __init__(self, cls_name):
        self.cls_name = cls_name

class Student:
    def __init__(self, stu_name):
        self.stu_name = stu_name

cls_room = ClassRoom("web一班")

cls_room.stu_list = list()

s1 = Student("安娜")
s2 = Student("双双")

cls_room.stu_list.extend([s1, s2])

for stu in cls_room.stu_list:
    print(stu.stu_name)